# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $

ESVN_REPO_URI="https://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/${PN}-${PV}"

inherit cmake-utils eutils python qt4 subversion

DESCRIPTION="Wengophone NG is a VoIP client featuring the SIP protocol"
HOMEPAGE="http://www.openwengo.org/"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=">=x11-libs/qt-4.2
	>=dev-util/cmake-2.4
	>=dev-libs/boost-1.33
	>=dev-lang/python-2.4
	>=dev-util/scons-0.96
	>=media-libs/alsa-lib-1.0.11
	>=dev-libs/openssl-0.9.8a
	>=dev-libs/glib-2.10
	>=sys-fs/e2fsprogs-1.38
	>=media-libs/speex-1.1.12
	>=media-video/ffmpeg-0.4.9_p20060823
	>=net-libs/gnutls-1.2.9
	>=dev-libs/libxml2-2.6.24
	>=media-libs/libsamplerate-0.1.2
	>=net-misc/curl-7.16.1
	>=media-libs/portaudio-19
	>=media-libs/libsndfile-1.0.12
	>=net-libs/libosip-3.0.1
	"

#pkg_setup() {
#	if ! built_with_use dev-libs/boost threads; then
#		eerror "This package requires dev-libs/boost compiled with threads support."
#		die "Please reemerge dev-libs/boost with USE=\"threads\"."
#	fi
#}

src_unpack() {
#	if [ -d ${ESVN_STORE_DIR}/${PN}/${P} ]; then
#		${ESVN_UPDATE_CMD}
#	else
		subversion_fetch
#	fi
}

src_compile() {
#	cmake-utils_use_with
#	cmake-utils_use_enable
	cmake-utils_src_compile || die "econf failed"
	cmake-utils_src_make || die "emake failed"
}

src_install() {
	cmake-utils_src_install
	domenu wengophone/res/wengophone.desktop
	doicon wengophone/res/wengophone*.png
}
